<?php

/**
 * @name: HOTN Sponsor
 * @author: HammerOnTheNail
 * @link: http://code.google.com/p/hotnsponsor/
 */

$eplug_admin = TRUE;
require_once("../../../class2.php"); 
require_once(e_ADMIN."auth.php");
if(!getperms("P")){ header("location:".e_BASE."index.php"); }
if(e_QUERY)
{
	$qs = explode(".", e_QUERY);
}

include(e_PLUGIN."hotn_sponsor/languages/".e_LANGUAGE.".php");
$sql = new db;

//--- Body
$text = HOTN_SPONSOR_ADMIN_MAIN_TEXT;
$title = "HOTN Sponsor Admin";

if (isset($qs[0]) && isset($qs[1])) include("admin_".$qs[0]."_".$qs[1].".php");

$ns -> tablerender($title, $text);  

function admin_index_adminmenu()
{
	global $qs;
	$act = $qs[0].".".$qs[1];

	$var['sponsor.add']['text'] = HOTN_SPONSOR_ADMIN_MENU_SPONSOR;
	$var['sponsor.add']['link'] = e_SELF."?sponsor.add";

	$var['sponsor.edit']['text'] = HOTN_SPONSOR_ADMIN_MENU_OPTIONS;
	$var['sponsor.edit']['link'] = e_SELF."?sponsor.edit";

	show_admin_menu(HOTN_SPONSOR_ADMIN_MENU_MAIN, $act, $var);
	
	$var = array();
	
	$var['help.show']['text'] = HOTN_SPONSOR_ADMIN_MENU_HELP_SHOW;
	$var['help.show']['link'] = "../ReadMe.html";
	
	show_admin_menu(HOTN_SPONSOR_ADMIN_MENU_HELP, $act, $var);
}
require_once(e_ADMIN."footer.php");
exit;
?>
